Segtree Basics

Table of Contents

1. Recursive Segtree

1.1. Range Modification and Lazy Tags

In order to do range modifications, we usually have 2 ways: tag persistence or lazy tag. The difference is that, the former does not push down tags to nodes as the latter does, instead, it maintains the tags separately, and only accumulates the tags during queries.

Date: 2026-06-04 Thu